package offlineFourSquare;

import java.util.Date;

import lib.ArgumentValidator;

public class CheckinMessage 
{
    private int userID;
    private String message;
    private Location location;
    private Date checkinTime;
    
    
    public CheckinMessage(
            int userID,
            String message,
            Location location,
            Date checkinTime)
    {
        // message can be null
        ArgumentValidator.IsNotNull("location", location);
        ArgumentValidator.IsNotNull("checkinTime", checkinTime);
        
        this.userID = userID;
        this.message = message;
        this.location = location;
        this.checkinTime = checkinTime;
    }
    
    public String Serialize()
    {
        return null;
        // throw new NotImplementedException();
    }
    
    public static CheckinMessage Deserialize(String serializedMsg)
    {
        return null;
        // throw new NotImplementedException();
    }
    
    public CheckinMessage(
            int userID,
            Location location,
            Date checkinTime) 
    {
        this(userID, null, location, checkinTime);
    }

    public int UserID() {
        return userID;
    }

    public String Message() {
        return message;
    }

    public Location Location() {
        return location;
    }

    public Date CheckinTime() {
        return checkinTime;
    }
}
